package main

import (
	"go-ringtimer/internal/server"
	"log"
)

func main() {
	defer func() {
		if err := recover(); err != nil {
			log.Print(err)
		}
	}()
	done := make(chan struct{})
	p, err := server.NewPlatform("php", server.RESTFUL, server.RestfulOptionSetter(server.RestfulOption{
		URL:         "http://blog.sureyee.com/task-test",
		ContentType: "application/json",
	}))
	if err != nil {
		log.Fatal(err)
	}
	s := server.NewScheduler()
	s.AddPlatform(p)
	s.Start()
	<-done
}
